@extends('admin.layout.layout')
@section('title')
<script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.config.js')}}"></script>
<script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/ueditor.all.min.js')}}"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="{{asset('/public/ueditor1_4_3_3-utf8-php/utf8-php/lang/zh-cn/zh-cn.js')}}"></script>
    <title>北京仁爱慈善基金CMS管理系统 >> 修改项目内容</title>
@endsection
@section('con')
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">项目内容修改</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
	<div class="panel panel-default">
        <div class="panel-heading">
           @if (count($errors) > 0)
			    <div class="alert alert-danger">
			        <ul>
			            @foreach ($errors->all() as $error)
			                <li>{{ $error }}</li>
			            @endforeach
			        </ul>
			    </div>
			@endif 
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-lg-6 col-lg-offset-3">
                    <form role="form" action="{{asset('/admin/pcontent/update')}}" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label>项目内容标题:</label>
                            <input class="form-control" type="text" name="title" value="{{$datas->title}}">
                        </div>
                        <div class="form-group">
                            <label>项目内容主图:</label>
                            <input type="file" name="pic">
                            <img src="{{asset($datas->pic)}}" alt="" width="150px" style="margin-left:180px;margin-top:-40px;">
                        </div>
                        <div class="form-group">
                            <label>项目内容概述:</label>
                            <textarea class="form-control" rows="3" name="intro">{{$datas->intro}}</textarea>
                        </div>
                        <div class="form-group">
                            <label>文章来源:</label>
                            <input class="form-control" type="text" name="author" value="{{$datas->author}}">
                        </div>
                        <div class="form-group">
                            <label>发布者:</label>
                            <label>发表人:</label>
                            <input class="form-control" type="text" name="pauthor" value="{{$datas->pauthor}}">
                        </div>
                        <div class="form-group">
                            <label>项目内容:</label>
                            <script id="editor" type="text/plain" style="height:300px;">{!!$datas->editorValue!!}</script>
                        </div>
                        <div class="form-group">
                            <label>显示状态:</label>
                            <select class="form-control" name="status">
                                <option value="0" @if($datas->status == 0) selected @endif>禁止</option>
                                <option value="1" @if($datas->status == 1) selected @endif>开启</option>
                            </select>
                        </div>
                        <input type="hidden" name="id" value="{{$datas->id}}">
						{{ csrf_field() }}
                        <button type="submit" class="btn btn-info">修改</button>
                        <button type="submit" class="btn btn-info">添加</button>
                        <button type="reset" class="btn btn-outline btn-warning">重置</button>
                    </form>
                </div>
                <!-- /.col-lg-6 (nested) -->
               
                <!-- /.col-lg-6 (nested) -->
            </div>
            <!-- /.row (nested) -->
        </div>
        <!-- /.panel-body -->
    </div>
   
    <!-- /.row -->
  
    <!-- /.row -->
@endsection
@section('js')
    <script>
        var ue = UE.getEditor('editor');
    </script>
@endsection